<template>
  <div></div>
</template>
<script>
// import { mapGetters } from "vuex";
export default {
  created() {
    this.$axios.get("/UserUser/GetMyUserInfo").then((res) => {
      if (res.success) {
        this.$store.commit("updateLogin", true);
        this.$store.commit("updateToken", res.data.UserName);
        this.$store.commit("updateUserName", res.data.UserName);
        this.$store.commit("updateChnName", res.data.ChnName);
        this.$store.commit("updateCompanyCode", res.data.CompanyCode);
        // 模块
          this.$store.commit("setIsTempUser", res.data.IsTempUser);
        this.$store
          .dispatch("getRoles", res.data.UserKind)
          .then((data) => {
            console.log(data);
          })
          .catch((err) => {});
        this.$router.push({
          path: this.$route.query.url,
        });
      }
    });
  },
  // computed: {
  //   ...mapGetters(["userName"]),
  // },
};
</script>